const express = require('express');
const router = express.Router();
// 导入数据库
const db = require('../config/database');

router.get('/type', (req, res) => {
    // 查询数据库
    db.query('SELECT * FROM tb_knowledge_type', (err, result) => {
        if (err) throw err;
        res.json(result)
    })
})

module.exports = router